from typing import Optional
from pydantic import BaseModel

class OtherOrderBase(BaseModel):
    work_area_id: int = -1
    package_order_id: int = -1
    package_order_title: Optional[str] = None
    OrderType: str
    order_context: str
    UnitPrice: float
    OrderPeople: int
    OrderPeopleCount: int
    TotalAmount: float
    Currency: str = "HKD"
    notes: Optional[str] = None

class OtherOrderCreate(OtherOrderBase):
    pass

class OtherOrderUpdate(BaseModel):
    package_order_id: Optional[int] = None
    package_order_title: Optional[str] = None
    OrderType: Optional[str] = None
    order_context: Optional[str] = None
    UnitPrice: Optional[float] = None
    OrderPeople: Optional[int] = None
    OrderPeopleCount: Optional[int] = None
    TotalAmount: Optional[float] = None
    Currency: Optional[str] = None
    notes: Optional[str] = None

class OtherOrder(OtherOrderBase):
    ID: int

    class Config:
        from_attributes = True 